package com.soft.line.filter;

public enum StatusCode {

    SC_200("SC_200"),
    SC_201("SC_201"),
    SC_400("SC_400"),
    SC_401("SC_401"),
    SC_404("SC_404"),
    SC_405("SC_405"),
    SC_422("SC_422"),
    SC_500("SC_500"),
    SC_10000("SC_10000"),
    SC_10001("SC_10001"),
    SC_10002("SC_10002"),
    SC_10004("SC_10004"),
    SC_10003("SC_10003");



    private String code;

    private StatusCode(String code) {
        this.code = code;
    }

    public String val() {
        return this.code;
    }

    public static StatusCode valueOf(int code) {
        switch (code) {
            case 200:
                return SC_200;
            case 201:
                return SC_201;
            case 400:
                return SC_400;
            case 401:
                return SC_401;
            case 404:
                return SC_404;
            case 405:
                return SC_405;
            case 422:
                return SC_422;
            case 500:
                return SC_500;
            case 10000:
                return SC_10000;
            case 10001:
                return SC_10001;
            case 10002:
                return SC_10002;
            case 10003:
                return SC_10003;
            case 10004:
                return SC_10004;
            default:
                return SC_500;
        }
    }
}
